using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace RenderEngine
{
	internal class BasicModelRender : ModelRender
	{
		public BasicModelRender(Model model)
			: base(model)
		{
		}
		public override void Draw(GameTime gameTime, ref Matrix view, ref Matrix projection, ref Matrix world)
		{
			foreach (ModelMesh mesh in this.Model.Meshes)
			{
				// NOTE: We will not draw stuff that starts with *
				
				if (mesh.Name.StartsWith("*"))
				{

				}
				else
				{
					foreach (BasicEffect effect in mesh.Effects)
					{
						effect.World = world;
						effect.View = view;
						effect.Projection = projection;
						effect.EnableDefaultLighting();
						effect.SpecularColor = Vector3.Zero;
					}
					mesh.Draw();
				}
			}
		}
	}
}
